<template>
  <div id="app">
    <!-- 是否要添加切换效果transition -->
    <!-- <transition :name="transitionName"> -->
    <!-- 判断是否要使用keep-alive进行缓存 -->
    <keep-alive v-if="$route.meta.keepAlive">
      <router-view class="router"></router-view>
    </keep-alive>
    <router-view class="router" v-else></router-view>
    <!-- </transition> -->
    <!-- 是否要显示加载loading -->
    <!-- <div v-if="showLoading" class="mask" @click.stop="">
      <van-loading class="loading" type="spinner" color="#fa6c19" />
    </div> -->
  </div>
</template>

<script>
// import defaultSetting from "./settings"; // 引入默认设置
export default {
  name: "app",
  computed: {
    // 加载动画切换
    // transitionName() {
    //   if (defaultSetting.needPageTrans) {
    //     return this.$store.state.direction;
    //   }
    //   return "";
    // },
    // 根据登录状态显示加载loading
    showLoading() {
      return this.$store.state.loading;
    },
  },
  mounted() {},
};
</script>

<style lang="less">
#app {
  // font-family: "Avenir", Helvetica, Arial, sans-serif;
  // -webkit-font-smoothing: antialiased;
  // -moz-osx-font-smoothing: grayscale;
  // color: #2c3e50;
  width: 100%;
  height: 100%;
  position: relative;
  font-size: 16px;
}
</style>
